package Chapter08.Classroom;

public class Computer {
    Cpu cpu;
    Ems ems;
    Harddisk harddisk;
    Mouse mouse;
    Keyboard kb;

    public Computer(Cpu cpu, Ems ems, Harddisk harddisk, Mouse mouse, Keyboard kb) {
        this.cpu = cpu;
        this.ems = ems;
        this.harddisk = harddisk;
        this.mouse = mouse;
        this.kb = kb;
    }

    public void show(){
        System.out.println("计算机的信息如下：");
        System.out.println("CPU的品牌是:"+cpu.Brand()+",主频是："+cpu.Frequency()+"GHz");
        System.out.println("内存的容量："+ems.capacity()+"T");
        System.out.println("计算机容量："+harddisk.capacity()+"T");
        System.out.println("鼠标价格"+mouse.money());
        System.out.println("键盘质量"+kb.mass());
    }
}
